#include <stdio.h>

/*
 * 运算符 +
 */

int main()
{
	int a = 1, b = 2, c;

	c = a + b;
	printf("%x\n", c);

	c = c + 1;
	printf("%x\n", c);

	return 0;
}

#if 0

/*
 * intel
 */
0000000000001149 <main>:
    1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 10          	sub    $0x10,%rsp
    1155:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%rbp)	// (rbp-0xc)=0x1
    115c:	c7 45 f8 02 00 00 00 	movl   $0x2,-0x8(%rbp)	// (rbp-0x8)=0x2
    1163:	8b 55 f4             	mov    -0xc(%rbp),%edx	// edx=(rbp-0xc)
    1166:	8b 45 f8             	mov    -0x8(%rbp),%eax	// eax=(rbp-0x8)
    1169:	01 d0                	add    %edx,%eax	// eax=eax+edx
    116b:	89 45 fc             	mov    %eax,-0x4(%rbp)	// (rbp-0x4)=eax
    116e:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax=(rbp-0x4)
    1171:	89 c6                	mov    %eax,%esi	// esi=eax
    1173:	48 8d 3d 8a 0e 00 00 	lea    0xe8a(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    117a:	b8 00 00 00 00       	mov    $0x0,%eax
    117f:	e8 cc fe ff ff       	callq  1050 <printf@plt>
    1184:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)	// (rbp-0x4)+=0x1
    1188:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax=(rbp-0x4)
    118b:	89 c6                	mov    %eax,%esi	// esi=eax
    118d:	48 8d 3d 70 0e 00 00 	lea    0xe70(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1194:	b8 00 00 00 00       	mov    $0x0,%eax
    1199:	e8 b2 fe ff ff       	callq  1050 <printf@plt>
    119e:	b8 00 00 00 00       	mov    $0x0,%eax
    11a3:	c9                   	leaveq 
    11a4:	c3                   	retq   
    11a5:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    11ac:	00 00 00 
    11af:	90                   	nop

/*
 * arm
 */
000000000040055c <main>:
  40055c:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400560:	910003fd 	mov	x29, sp
  400564:	52800020 	mov	w0, #0x1                   	// #1
  400568:	b9001fa0 	str	w0, [x29, #28]	// [x29+28]=w0
  40056c:	52800040 	mov	w0, #0x2                   	// #2
  400570:	b9001ba0 	str	w0, [x29, #24]	// [x29+24]=w0
  400574:	b9401fa1 	ldr	w1, [x29, #28]	// w1=[x29+28]
  400578:	b9401ba0 	ldr	w0, [x29, #24]	// w0=[x29+24]
  40057c:	0b000020 	add	w0, w1, w0	// w0=w1+w0
  400580:	b90017a0 	str	w0, [x29, #20]	// [x29+20]=w0
  400584:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400588:	9119c000 	add	x0, x0, #0x670
  40058c:	b94017a1 	ldr	w1, [x29, #20]	// w1=[x29+20]
  400590:	97ffffb0 	bl	400450 <printf@plt>
  400594:	b94017a0 	ldr	w0, [x29, #20]	// w0=[x29+20]
  400598:	11000400 	add	w0, w0, #0x1	// w0=w0+0x1
  40059c:	b90017a0 	str	w0, [x29, #20]	// [x29+20]=w0
  4005a0:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  4005a4:	9119c000 	add	x0, x0, #0x670
  4005a8:	b94017a1 	ldr	w1, [x29, #20]
  4005ac:	97ffffa9 	bl	400450 <printf@plt>
  4005b0:	52800000 	mov	w0, #0x0                   	// #0
  4005b4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4005b8:	d65f03c0 	ret
  4005bc:	00000000 	.inst	0x00000000 ; undefined

#endif
